/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cliente;

import java.net.URL;
/**
 *
 * @author Ricardo Tominaga
 */
public class CardLoader {
    private static final CardLoader cardloader = new CardLoader();    
    private CardLoader(){}
    public static CardLoader getCardLoader(){
        return cardloader;
    }
    public String getCardURL(){
        URL url = getClass().getResource("/Baralho/");
        return trataPath(url.toString()).substring(6);
        //return "C:/Users/Luty/Documents/NetBeansProjects/ArquivosPresidenteSVN/trunk/PresidenteCliente/src/Baralho/";
    }

    private String trataPath(String path){
        String string;
        String string2=path;
        if(path.contains(".jar!/")){
            string = path.replaceAll("jar:", "");
            string2 = string.replaceAll("PresidenteCliente.jar!/", "");

        }
        return string2;
    }
}
